package com.evony.common.beans 
{
    import com.evony.common.*;
    import flash.events.*;
    import mx.collections.*;
    import mx.events.*;
    
    public class GemStoneLvInfroBean extends Object
    {
        public function GemStoneLvInfroBean(arg1:Object=null)
        {
            super();
            var loc1:*=0;
            var loc2:*=null;
            _353643255gemstoneidsArray = new mx.collections.ArrayCollection();
            _bindingEventDispatcher = new flash.events.EventDispatcher(flash.events.IEventDispatcher(this));
            if (arg1 != null) 
            {
                if (arg1.lv != null) 
                {
                    this.lv = arg1.lv;
                }
                if (arg1.gemstoneids) 
                {
                    loc1 = 0;
                    while (loc1 < arg1.gemstoneids.length) 
                    {
                        loc2 = new com.evony.common.beans.GemStoneBean(arg1.gemstoneids[loc1]);
                        this.gemstoneidsArray.addItem(loc2);
                        ++loc1;
                    }
                }
            }
            return;
        }

        public function setGemstoneids(arg1:com.evony.common.beans.GemStoneBean, arg2:int):void
        {
            this.gemstoneidsArray[arg2] = arg1;
            return;
        }

        public function toDebugString(arg1:String=""):String
        {
            var loc1:*=0;
            var loc2:*="";
            loc2 = loc2 + (arg1 + "lv = " + this.lv + "\n");
            loc1 = 0;
            while (loc1 < this.gemstoneidsArray.length) 
            {
                loc2 = loc2 + this.getGemstoneids(loc1).toDebugString(arg1 + "gemstoneids[" + loc1 + "].");
                ++loc1;
            }
            return loc2;
        }

        public function getGemstoneids(arg1:int):com.evony.common.beans.GemStoneBean
        {
            var loc1:*=this.gemstoneidsArray[arg1] as com.evony.common.beans.GemStoneBean;
            return loc1;
        }

        public function copyTo(arg1:com.evony.common.beans.GemStoneLvInfroBean):void
        {
            arg1.lv = this.lv;
            com.evony.common.CommonUtil.arrayCopy(this.gemstoneidsArray, arg1.gemstoneidsArray);
            return;
        }

        public function toObject():Object
        {
            var loc1:*=new Object();
            loc1.lv = this.lv;
            return loc1;
        }

        [Bindable]
        public var gemstoneidsArray:mx.collections.ArrayCollection;

        [Bindable]
        public var lv:int;
    }
}
